/*ticketclerk.h*/
#ifndef TicketClerk_H
#define TicketClerk_H

struct TicketClerk{
	int index;
	int replyTo;
	int msgLock;
	int myName;
	int sleepCon;
	int lineLength;
	
	int moneyCollected;
	int onBreak;
	/*Possible statuses for TicketClerk: {Idle, WaitingForCust, WaitingForPay, TalkingToManager, OnBreak}*/
	int status;
	int TICKET_PRICE;
	int numMsgs;
	int runScheduler;
	struct Message tempMsg;
	struct Message msgList[3];
};

void TicketClerk_Scheduler(int index);
struct Message TicketClerk_GetMessage(int index, int name);

int TicketClerk_CallNextInLine(int index);
void TicketClerk_AskForPayment(int index, int cust);
void TicketClerk_GiveTickets(int index,int cust);
void TicketClerk_GiveManagerMoney(int index);
void TicketClerk_TellStatus(int index);
void TicketClerk_ContinueOn(int index);
void TicketClerk_GoOnBreak(int index);
void TicketClerk_ComeOffBreak(int index);

#endif